<?php
/**
 * Created by PhpStorm.
 * Author: 芸签cms www.yunqiancms.com
 * User: sun
 * Date: 2022/6/23
 * Time: 2:10 PM
 */
namespace app\common\exceptions;

use Exception;

class BizException extends Exception
{
    public $redirect = '';
    public $data = [];

    public function __construct($message = "", $data = [], $redirect = '')
    {
        $this->data = $data;
        $this->redirect = $redirect;
        parent::__construct($message, 0);
    }
    public function setRedirect($redirect)
    {
        $this->redirect = $redirect;
    }
    public function getData()
    {
        return $this->data;
    }

    public function getRedirect()
    {
        return $this->redirect;
    }

    public function getStatusCode()
    {
        return 200;
    }

}